package edu.nf.vrs.announcement.dao;

import edu.nf.vrs.announcement.entiy.Announcement;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Lv
 * @date 2022/4/6
 */
public interface AnnouncementDao {

    /**
     * 查询所有公告
     * @param pageNum
     * @param pageSize
     * @return
     */
    List<Announcement> listAnnouncement(@Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize);

    /**
     * 发布新公告
     * @param announcement
     */
    void addAnnouncement(Announcement announcement);

    /**
     * 更新公告
     * @param announcement
     */
    void updateAnnouncement(Announcement announcement);

    /**
     * 根据ID查询公告
     * @param id
     * @return
     */
    Announcement getAnnouncementById(Integer id);

}
